function fig = plot_irf_fan(Hi,Lo,lim,ylab)
fig=figure;

shock_min(1) = min(min([
    Hi(1,:,[1,2,3]), Hi(4,:,[1,2,3]),Hi(7,:,[1,2,3])...
    Lo(1,:,[1,2,3]), Lo(4,:,[1,2,3]),Lo(7,:,[1,2,3])]));
shock_min(2) = min(min([
    Hi(2,:,[1,2,3]), Hi(5,:,[1,2,3]),Hi(8,:,[1,2,3])...
    Lo(2,:,[1,2,3]), Lo(5,:,[1,2,3]),Lo(8,:,[1,2,3])]));
shock_min(3) = min(min([
    Hi(3,:,[1,2,3]), Hi(6,:,[1,2,3]),Hi(9,:,[1,2,3])...
    Lo(3,:,[1,2,3]), Lo(6,:,[1,2,3]),Lo(9,:,[1,2,3])]));
shock_max(1) = max(max([
    Hi(1,:,[1,2,3]), Hi(4,:,[1,2,3]),Hi(7,:,[1,2,3])...
    Lo(1,:,[1,2,3]), Lo(4,:,[1,2,3]),Lo(7,:,[1,2,3])]));
shock_max(2) =max( max([
    Hi(2,:,[1,2,3]), Hi(5,:,[1,2,3]),Hi(8,:,[1,2,3])...
    Lo(2,:,[1,2,3]), Lo(5,:,[1,2,3]),Lo(8,:,[1,2,3])]));
shock_max(3) = max(max([
    Hi(3,:,[1,2,3]), Hi(6,:,[1,2,3]),Hi(9,:,[1,2,3])...
    Lo(3,:,[1,2,3]), Lo(6,:,[1,2,3]),Lo(9,:,[1,2,3])]));

scale = 100;
for i=1:3;
    for j=1:3;
        k=(i-1)*3+j;
        fig_sub = subplot(3,3,k);
        
        %  hold on
         ciplot_h( Lo(k,:,1)*scale,Hi(k,:,1)*scale,[0:lim],[0.2,0.2,0.2],1);
      %  plot([0:lim],  Lo(k,:,2)*scale,'k--','linewidth',2)
       % hold on
      %  plot([0:lim], Hi(k,:,2)*scale,'k--','linewidth',2)
        
        %ciplot_h( Lo(k,:,1)*scale,Hi(k,:,1)*scale,[0:lim],[1,1,1],0.8);
        hold on
        plot([0:lim], zeros(lim+1,1),'k','Linewidth',1)
        title([ylab{i}  '\space\space Shock'],'Fontsize',10,'Interpreter','Latex');
        ylabel([ylab{j}],'Fontsize',10,'Interpreter','Latex');
        if i >2
            xlabel('Months','Fontsize',10,'Interpreter','Latex');
        end
        xlim([0,lim])
        if j <4
            Lo_1_1 = linspace(shock_min(j)*scale,0,2);
            Lo_1_2 = linspace(0,shock_max(j)*scale,3);
        end
        set(fig_sub ,'YTick',[Lo_1_1(1:end-1),Lo_1_2])
        set(fig_sub ,'Ylim',[shock_min(j)*scale,shock_max(j)*scale])
        %n=get(fig_sub ,'Ytick');
        tix=get(gca,'ytick')';
         set(gca,'yticklabel',num2str(tix,'%.1f'))
        %set(fig_sub ,'yticklabel',sprintf('%.1f |',n'));
%         if i == 2 & j == 2
%             leg = legend('90 Confidence Interval','Estimate for Identified Set');
%             set(leg,'Location','southeast','box','off','fontsize',13)
%         end
        
        
        
        
        
    end
end